<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>网络新闻</title>

<meta http-equiv="keywords" content="nms,新闻">
<meta http-equiv="description" content="nms">
<meta http-equiv="content-type" content="text/html; charset=utf-8">

<link rel="stylesheet" type="text/css" href="/res/style/common.css">
<link rel="stylesheet" type="text/css" href="/res/style/showNews.css">
<script type="text/javascript" src="/res/script/common.js"></script>
<script type="text/javascript" src="/res/script/showNews.js"></script>
</head>

<body onload="ini();">
	<jsp:include page="/page/common/header.jsp"></jsp:include>
	<div class="NewsContentDiv">
		<div class="RowDiv">
			<div class="ShowContentDiv">${news.content}</div>
			<div class="BackupDiv"><p>侧边栏</p></div>
		</div>
	</div>
	<c:forEach items="${news.comments}" var="c" varStatus="vStatus">
		<div class="CellDiv">
			<div class="CommentItemDiv">
				<div class="ItemLeftDiv">
					<img alt="" src="/res/image/head.jpg">
				</div>
				<div class="ItemRightTop">
					<label>评论者：${c.user.nickname }</label>
					<div class="TimeDiv"><label>评论时间：${c.date}</label></div>
				</div>
				
				<div class="ItemRightBottom">
					<label>${c.content}</label>
				</div>
			</div>
		</div>
	</c:forEach>
	<div class="CellDiv">
		<form action="newsManage.action?id=${news.id}&act=comment" method="post">
			<div class="CommentEditorDiv">
				<div class="ButtonDiv">
					<span><a href="#">关注</a></span>
					<span><a href="#">分享</a></span>
					<span><a href="#"></a></span>
					<button type="submit" onclick="return validate()">评论</button>
				</div>
				<div class="EditorDiv">
					<textarea name="comment.content" rows="5" cols="80" id="id_CommentTextArea"></textarea>
				</div>
			</div>
			</form>
	</div>
	<jsp:include page="/page/common/footer.jsp"></jsp:include>
</body>
</html>